<?php
/**
 * Created by PhpStorm.
 * User: chenx
 * Date: 18-3-8
 * Time: 下午4:12
 */

namespace common\models;


use yii\db\ActiveRecord;
use common\models\User;
use common\service\GlobalUrlService;
class Order extends ActiveRecord
{
    public static function tableName()
    {
        return 'order';
    }

    public function rules()
    {
        return [
            [['id','pay_status','order_type','order_status','goods_num','pay_time','user_id',
                'created_time','complete_time','is_delete','defaults_time','refund_time',
                'send_time','is_apply_after_sale','shop_id','goods_id'],'integer'],
            [['order_money','freight'],'double'],
            [['order_no','transport_no','serial_no','province',
                'city','county','address','addressee_phone','addressee_name','out_refund_no','express','remark','express_code'],'string']
        ];
    }

    public function attributeLabels()
    {
        return [
            'id' => '自动增量',
            'order_no' => '订单编号',
            'pay_status' => '支付状态',
            'order_status' => '订单状态',
            'order_type' => '订单类型 ',
            'transport_no' => '运单号 ',
            'serial_no' => '流水号 ',
            'out_refund_no' => '退款订单号 ',
            'order_money' => '金额 ',
            'freight' => '运费 ',
            'goods_num' => '商品数量 ',
            'pay_time' => '支付时间 ',
            'user_id' => '用户id ',
            'shop_id' => '店铺id ',
            'goods_id' => '商品id/活动id ',
            'province' =>'省',
            'city' =>'市',
            'county' =>'县',
            'address' =>'详细地址',
            'addressee_phone' =>'收件人电话',
            'addressee_name' =>'收件人姓名',
            'group_id' =>'成团id',
            'is_head' => '是否是团长',
            'created_time' => '下单时间 ',
            'complete_time' => '完成时间',
            'defaults_time' => '默认收货时间',
            'refund_time' => '申请退款时间',
            'is_delete' => '是否删除',
            'express' => '快递公司',
            'express_code' => '快递公司编号',
            'remark' => '备注',
            'send_time' => '发送时间',
            'is_apply_after_sale' => '是否申请售后',
        ];
    }

}